Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-104404: fix crasher with nested comprehensions plus lambdas #104442

Merged
merged 1 commit into from
May 13, 2023

Conversation

carljm
Copy link
Member

@carljm carljm commented May 12, 2023

The fix for gh-104357 (#104368) is the cause of this crash. We can't promote a local to a cell before analyze_cells has run, or we'll fail to see that that local resolves a free var from a child scope. Instead we have to record the names that need promoting to cell in the scope due to being a cell in an inlined comprehension, and handle them within analyze_cells.

Fixes gh-104404.

@JelleZijlstra JelleZijlstra merged commit 563c7dc into python:main May 13, 2023
@carljm carljm deleted the crasher branch June 16, 2023 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PEP 709 segfault with nested comprehensions plus lambdas
3 participants